(function () {
    "use strict";
    var e = {
        5968: function (e, t, s) {
            var r = s(7342), a = s.n(r), l = s(2572), o = s.n(l), n = s(3755), i = s.n(n), u = s(714), c = s.n(u),
                p = s(8192), m = s.n(p), f = s(3256), d = s.n(f), h = s(5981), g = s.n(h), b = s(5583), _ = s.n(b),
                v = s(9371), y = s.n(v), w = s(1168), k = s.n(w), T = s(8319), x = s.n(T), S = s(5388), P = s.n(S),
                I = s(1393), O = s.n(I), $ = s(3729), C = s.n($), L = s(1407), U = s.n(L), A = s(4438), B = s.n(A),
                R = s(6213), z = s.n(R), N = s(4327), j = s.n(N), E = s(138), D = s.n(E), V = s(6734), q = s.n(V),
                H = s(9745), W = s.n(H), Z = s(3480), M = s.n(Z), G = s(2086), K = s.n(G), F = s(1540), Y = s.n(F),
                J = s(4514), Q = s.n(J), X = s(7934), ee = s.n(X), te = s(311), se = s.n(te), re = function () {
                    var e = this, t = e.$createElement, s = e._self._c || t;
                    return s("div", {attrs: {id: "app"}}, [s("el-container", [s("el-header", {staticClass: "header-border"}, [s("NavigationBar")], 1), s("el-main", [s("HomeView")], 1), s("el-footer", [s("Copyright")], 1)], 1)], 1)
                }, ae = [], le = function () {
                    var e = this, t = e.$createElement, s = e._self._c || t;
                    return s("el-row", {
                        staticStyle: {"align-items": "center"},
                        attrs: {type: "flex", justify: "space-between"}
                    }, [s("el-col", {
                        staticClass: "ellipsis",
                        attrs: {span: 6}
                    }, [s("span", {staticClass: "openharmony-font"}, [e._v("BoringTest")]), s("span", {staticClass: "powermgr-font"}, [e._v(e._s("用例验证网站"))])]), s("el-col", {attrs: {span: 15}}), s("el-col", {attrs: {span: 3}}, 1)], 1)
                }, oe = [], ne = function () {
                    var e = this, t = e.$createElement, s = e._self._c || t;
                    return s("div", [e.showLoginBtn ? s("el-button", {
                        staticClass: "login-btn",
                        attrs: {size: "medium"},
                        on: {click: e.login}
                    }, [e._v("登录")]) : e._e(), e.showLoginBtn ? e._e() : s("el-dropdown", {
                        attrs: {placement: "bottom"},
                        on: {command: e.menuCommand}
                    }, [s("span", {staticClass: "el-dropdown-link"}, [s("el-avatar", {
                        attrs: {
                            size: "medium",
                            src: e.circleUrl
                        }
                    })], 1), s("el-dropdown-menu", {
                        attrs: {slot: "dropdown"},
                        slot: "dropdown"
                    }, [s("el-dropdown-item", {attrs: {command: "退出"}}, [e._v("退出")])], 1)], 1)], 1)
                }, ie = [];
            const ue = window.__MY_CONFIG__ || {}, ce = window.__TDD_TYPE__ || {multiple: !1, options: []},
                pe = window.__MODULE__ || {multiple: !1, options: []},
                me = window.__NAVIGATION_BAR_TITLE_ , fe = ue.API_HOST, de = {
                    STATS_API: fe + "/status",
                    START_API: fe + "/start",
                    PRTAG_API: fe + "/label",
                    COUNT_API: fe + "/count"
                }, he = ce, ge = pe, be = me;
            var _e = {
                }, ve = _e, ye = s(1001), we = (0, ye.Z)(ve, ne, ie, !1, null, null, null), ke = we.exports, Te = {
                    name: "NavigationBar", components: {LoginBar: ke}, data() {
                        return {navigationBarTitle: be}
                    }
                }, xe = Te, Se = (0, ye.Z)(xe, le, oe, !1, null, null, null), Pe = Se.exports, Ie = function () {
                    var e = this, t = e.$createElement, s = e._self._c || t;
                    return s("div", {staticStyle: {float: "right"}}, [s("samp", {staticClass: "copyright-font-size"}, [e._v(e._s(e.footerTip))]), s("el-link", {
                        staticClass: "copyright-link-font-size",
                        attrs: {type: "primary"},
                        on: {
                            click: function (t) {
                                return e.OpenPrUrl()
                            }
                        }
                    }, [e._v("Boring Test")]), s("samp", {staticClass: "copyright-font-size"}, [e._v(" | ")]), s("samp", {staticClass: "copyright-font-size"}, [e._v("访问量: ")]), s("samp", {staticClass: "copyright-font-size"}, [e._v(e._s(e.pv.visited))]), s("samp", {staticClass: "copyright-font-size"}, [e._v(" 执行数: ")]), s("samp", {staticClass: "copyright-font-size"}, [e._v(e._s(e.pv.analyzed))])], 1)
                }, Oe = [], $e = {
                    name: "Copyright", data() {
                        return {
                            footerTip: "" +
                                "测试模块划分见：",
                            teamTip: "https://gitee.com/yogaxxxxx/BoringTest/blob/master/data/config/case.json",
                            pv: {visited: 0, analyzed: 0}
                        }
                    }, created() {
                        this.getPv()
                    }, methods: {
                        OpenPrUrl() {
                            window.open(this.teamTip)
                        }, getPv() {
                            axios.get(de.COUNT_API).then((e => {
                                console.log(e.data), this.pv = e.data.data
                            })).catch((e => {
                                console.log(e)
                            }))
                        }
                    }
                }, Ce = $e, Le = (0, ye.Z)(Ce, Ie, Oe, !1, null, null, null), Ue = Le.exports, Ae = function () {
                    var e = this, t = e.$createElement, s = e._self._c || t;
                    return s("div", {staticClass: "home"}, [s("el-row", {
                        attrs: {
                            type: "flex",
                            justify: "center"
                        }
                    }, [s("el-col", {attrs: {span: 12}}, [s("PullRequest", {
                        on: {
                            submit: function (t) {
                                return e.flashTable()
                            }
                        }
                    })], 1), s("el-col", {attrs: {span: 0}})], 1), s("el-row", {
                        staticStyle: {"margin-top": "15px"},
                        attrs: {type: "flex", justify: "center"}
                    }, [s("el-col", {attrs: {span: 24}}, [s("TestWorkTable", {ref: "workTable"})], 1)], 1)], 1)
                }, Be = [], Re = function () {
                    var e = this, t = e.$createElement, s = e._self._c || t;
                    return s("el-card", {
                        attrs: {
                            shadow: "hover",
                            "body-style": "{padding: '10px'}"
                        }
                    }, [s("div", {
                        attrs: {slot: "header"},
                        slot: "header"
                    }, [s("span", [e._v("Pull Request 验证")])]), s("el-form", {
                        ref: "form",
                        attrs: {model: e.form, "label-width": "70px", size: "medium", rules: e.rules, "status-icon": ""}
                    }, [s("el-row", {staticClass: "pr-url-height"}, [s("el-col", {
                        staticClass: "pr-form-item",
                        attrs: {span: 24}
                    }, [s("el-form-item", {attrs: {label: "PR", prop: "prUrl"}}, [s("el-input", {
                        attrs: {
                            clearable: "",
                            placeholder: "请输入PR连接"
                        },
                        on: {blur: e.getPrStats, clear: e.clearTag},
                        model: {
                            value: e.form.prUrl, callback: function (t) {
                                e.$set(e.form, "prUrl", t)
                            }, expression: "form.prUrl"
                        }
                    }, [s("template", {slot: "prepend"}, [e._v(e._s(e.form.title))])], 2), "" != e.form.branch ? s("el-tag", {staticStyle: {"margin-right": "5px"}}, [e._v(" " + e._s(e.form.branch) + " ")]) : e._e(), "" != e.prInfo.message ? s("el-tag", {
                        staticStyle: {"margin-right": "5px"},
                        attrs: {type: "warning"}
                    }, [e._v(" " + e._s(e.prInfo.message) + " ")]) : e._e(), e._l(e.prInfo.tagList, (function (t) {
                        return s("el-tag", {
                            key: t.id,
                            staticStyle: {"margin-right": "5px"},
                            attrs: {type: "20c22e" == t.color ? "success" : "danger"}
                        }, [e._v(e._s(t.name))])
                    }))], 2)], 1)], 1), s("el-row", [s("el-col", {attrs: {span: 24}}, [s("el-form-item", {
                        attrs: {
                            label: "邮箱",
                            prop: "email"
                        }
                    }, [s("el-input", {
                        attrs: {
                            placeholder: "请输入测试报告发送的邮件地址",
                            clearable: ""
                        }, model: {
                            value: e.form.email, callback: function (t) {
                                e.$set(e.form, "email", t)
                            }, expression: "form.email"
                        }
                    })], 1)], 1)], 1), s("el-row", [s("el-col", {attrs: {span: 24}}, [t("el-form-item", {attrs: {label: "类型"}}, [s("el-select", {
                        staticStyle: {width: "500px"},
                        attrs: {multiple: "", placeholder: "请选择你的测试用例类型"},
                        model: {
                            value: e.form.type,
                            callback: function (t) {
                                e.$set(e.form, "type", t)
                            }, expression: "form.type"
                        }
                    }, e._l(e.testTypeList.options, (function (e) {
                        return t("el-option", {key: e.label, attrs: {label: e.label, value: e.label}})
                    })), 1)], 1)], 1)], 1), s("el-row", [s("el-col", {attrs: {span: 24}}, [t("el-form-item", {attrs: {label: "模块"}}, [s("el-select", {
                        staticStyle: {width: "500px"},
                        attrs: {multiple: "", placeholder: "请选择模块"},
                        model: {
                            value: e.form.module,
                            callback: function (t) {
                                e.$set(e.form, "module", t)
                            }, expression: "form.module"
                        }
                    }, e._l(e.moduleList.options, (function (e) {
                        return t("el-option", {key: e.label, attrs: {label: e.label, value: e.label}})
                    })), 1)], 1)], 1)], 1), s("el-row", [s("el-col", {
                        staticStyle: {"margin-top": "10px"},
                        attrs: {span: 24}
                    }, [s("el-form-item", [s("el-button", {
                        staticStyle: {width: "100%"},
                        attrs: {type: "", round: "", plain: "", loading: e.isSubmit},
                        on: {click: e.onSubmit}
                    }, [e._v("提交")])], 1)], 1)], 1)], 1)], 1)
                }, ze = [], Ne = {
                    name: "PullRequest", data() {
                        return {
                            testTypeList: he,
                            moduleList: ge,
                            rules: {
                                prUrl: [{
                                    type: "string",
                                    required: !0,
                                    message: "请输入pr链接",
                                    trigger: "blur"
                                }, {validator: this.validatorUrl, trigger: "blur"}],
                                email: [{
                                    type: "email",
                                    required: !0,
                                    message: "请输入邮箱",
                                    trigger: "blur"
                                }, {type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"]}],
                                type: [{type: "array",required: true,message: "请选择测试类型", trigger: "blur"}],
                                module: [{type: "string", required: !0, message: "请选择模块", trigger: "blur"}]
                            },
                            prInfo: {tagList: [], message: ""},
                            form: {title: "", prUrl: "", branch: "", type: "", email: "", module: ""},
                            isSubmit: !1
                        }
                    }, methods: {
                        validatorUrl(e, t, s) {
                            var r = /https:\/\/gitee.com\/openharmony\/.*\/pulls\/\d+$/gi;
                            0 == r.test(t) ? (this.clearTag(), s(new Error("PR链接格式错误"))) : s()
                        }, onSubmit() {
                            this.$refs.form.validate((e => {
                                if ("" == this.form.title || "" == this.form.branch)
                                    this.$message.warning("提交失败: 获取PR信息失败");
                                else {
                                    if (!e) return !1;
                                    this.submitPower()
                                }
                            }))
                        }, submitPower() {
                            this.isSubmit = !0, axios.post(de.START_API, this.form).then((e => {
                                200 == e.data.code ? (this.$message.success("提交成功: " + e.data.message), this.clear(), this.$emit("submit")) : this.$message.error("提交失败: " + e.data.message), this.isSubmit = !1
                            })).catch((() => {
                                this.$message.error("提交失败"), this.isSubmit = !1
                            }))
                        }, clearTag() {
                            this.prInfo.tagList = [], this.prInfo.message = "", this.form.branch = "", this.form.title = ""
                        }, clear() {
                            this.prInfo.tagList = [], this.prInfo.message = "", this.form.title = "", this.form.branch = "", this.form.prUrl = ""
                        }, getPrStats() {
                            this.validatorUrl("prStats", this.form.prUrl, (e => {
                                void 0 === e && axios.post(de.PRTAG_API, {prUrl: this.form.prUrl}).then((e => {
                                    if (-1 == e.data.code) this.$message.warning(e.data.message), this.prInfo.message = e.data.message; else {
                                        this.prInfo.message = "";
                                        let t = JSON.parse(e.data.data);
                                        this.form.branch = t.base.label, this.form.title = t.title, this.prInfo.tagList = t.labels
                                    }
                                })).catch((() => {
                                }))
                            }))
                        }
                    }
                }, je = Ne, Ee = (0, ye.Z)(je, Re, ze, !1, null, null, null), De = Ee.exports, Ve = function () {
                    var e = this, t = e.$createElement, s = e._self._c || t;
                    return s("el-card", {attrs: {shadow: "hover"}}, [s("div", {
                        attrs: {slot: "header"},
                        slot: "header"
                    }, [s("span", [e._v("执行详情")]), s("el-button", {
                        staticStyle: {float: "right", padding: "3px 0"},
                        attrs: {type: "text"},
                        on: {click: e.getWorkList}
                    }, [e._v("刷新")])], 1), s("el-table", {
                        staticStyle: {width: "100%"},
                        attrs: {data: e.tableData, size: "small", "default-sort": {prop: "creat_time", order: "descending"}}
                    }, [s("el-table-column", {
                        attrs: {prop: "title", label: "标题", width: "250"},
                        scopedSlots: e._u([{
                            key: "default", fn: function (t) {
                                return [s("el-link", {
                                    attrs: {
                                        type: "primary",
                                        disabled: e.isDisabled(t.row.version_url),
                                        underline: !1
                                    }, on: {
                                        click: function (s) {
                                            return e.OpenPrUrl(t.row.prUrl)
                                        }
                                    }
                                }, [e._v(e._s(t.row.title))])]
                            }
                        }])
                    }),s("el-table-column", {
                        attrs: {
                            prop: "user",
                            label: "提交者",
                            width: "130"
                        }
                    }), s("el-table-column", {
                        attrs: {prop: "state", label: "当前状态", width: "150"},
                        scopedSlots: e._u([{
                            key: "default", fn: function (e) {
                                return [s("el-steps", {
                                    attrs: {
                                        active: Number(e.row.state),
                                        "finish-status": "success"
                                    }
                                }, [s("el-step", {
                                    staticStyle: {"flex-basis": "50"},
                                    attrs: {title: "下载中"}
                                }),s("el-step", {
                                    staticStyle: {"flex-basis": "50"},
                                    attrs: {title: "执行中"}
                                }), s("el-step", {
                                    staticStyle: {"flex-basis": "50"},
                                    attrs: {title: "完成"}
                                }),], 1)]
                            }
                        }])
                    }),s("el-table-column", {
                        attrs: {
                            prop: "sn_id",
                            label: "设备",
                            width: "250",
                        }
                    }), s("el-table-column", {
                        attrs: {
                            prop: "creat_time",
                            label: "创建时间",
                            width: "140",
                            sortable: ""
                        }
                    }),s("el-table-column", {
                        attrs: {
                            prop: "begin_time",
                            label: "开始执行时间",
                            width: "140"
                        }
                    }), s("el-table-column", {
                        attrs: {
                            prop: "end_time",
                            label: "执行结束时间",
                            width: "140"
                        }
                    }),s("el-table-column", {
                        attrs: {
                            prop: "task_status",
                            label: "PR 执行情况",
                            width: "150"
                        }
                    }),s("el-table-column", {
                        attrs: {prop: "test", label: "报告", width: "50"},
                        scopedSlots: e._u([{
                            key: "default", fn: function (t) {
                                return [s("el-link", {
                                    attrs: {
                                        type: "primary",
                                        disabled: e.isDisabled(t.row.version_url),
                                        underline: !1
                                    }, on: {
                                        click: function (s) {
                                            return e.OpenPrUrl(t.row.reports_url)
                                        }
                                    }
                                }, [e._v(e._s(t.row.test))])]
                            }
                        }])
                    }), s("el-table-column", {
                        attrs: {
                            prop: "branch",
                            label: "分支",
                            width: "150"
                        }
                    }), s("el-table-column", {
                        attrs: {
                            prop: "type",
                            label: "类型",
                            width: "130"
                        }
                    }), s("el-table-column", {
                        attrs: {
                            prop: "module",
                            label: "模块",
                            width: "1300"
                        }
                    }), ], 1)], 1)
                }, qe = [], He = {
                    name: "TestWorkTable", data() {
                        return {tableData: []}
                    }, methods: {
                        getWorkList() {
                            axios.get(de.STATS_API).then((e => {
                                this.tableData = e.data.data
                            })).catch((() => {
                            }))
                        }, isDisabled(e) {
                            return null == e || "" == e || void 0 == e
                        }, OpenPrUrl(e) {
                            window.open(e)
                        }
                    }, created() {
                        this.getWorkList();
                        const e = setInterval((() => {
                            this.getWorkList()
                        }), 15e3);
                        this.$once("hook:beforeDestroy", (() => {
                            clearInterval(e)
                        }))
                    }
                }, We = He, Ze = (0, ye.Z)(We, Ve, qe, !1, null, null, null), Me = Ze.exports, Ge = {
                    name: "HomeView", components: {PullRequest: De, TestWorkTable: Me}, methods: {
                        flashTable() {
                            this.$refs.workTable.getWorkList()
                        }
                    }
                }, Ke = Ge, Fe = (0, ye.Z)(Ke, Ae, Be, !1, null, null, null), Ye = Fe.exports,
                Je = {components: {NavigationBar: Pe, HomeView: Ye, Copyright: Ue}}, Qe = Je,
                Xe = (0, ye.Z)(Qe, re, ae, !1, null, null, null), et = Xe.exports;
            se().config.productionTip = !1, se().prototype.$message = ee(), se().use(Q()), se().use(Y()), se().use(K()), se().use(M()), se().use(W()), se().use(q()), se().use(q()), se().use(D()), se().use(j()), se().use(z()), se().use(B()), se().use(U()), se().use(C()), se().use(O()), se().use(P()), se().use(x()), se().use(k()), se().use(y()), se().use(_()), se().use(g()), se().use(d()), se().use(m()), se().use(c()), se().use(i()), se().use(o()), se().use(a()), axios.interceptors.response.use((e => e), (e => Promise.reject(e))), axios.interceptors.request.use((e => (se().$cookies.isKey("access_token") && (e.headers.access_token = se().$cookies.get("access_token")), e)), (e => Promise.reject(e))), new (se())({render: e => e(et)}).$mount("#app")
        }, 311: function (e) {
            e.exports = Vue
        }
    }, t = {};

    function s(r) {
        var a = t[r];
        if (void 0 !== a) return a.exports;
        var l = t[r] = {exports: {}};
        return e[r](l, l.exports, s), l.exports
    }

    s.m = e, function () {
        var e = [];
        s.O = function (t, r, a, l) {
            if (!r) {
                var o = 1 / 0;
                for (c = 0; c < e.length; c++) {
                    r = e[c][0], a = e[c][1], l = e[c][2];
                    for (var n = !0, i = 0; i < r.length; i++) (!1 & l || o >= l) && Object.keys(s.O).every((function (e) {
                        return s.O[e](r[i])
                    })) ? r.splice(i--, 1) : (n = !1, l < o && (o = l));
                    if (n) {
                        e.splice(c--, 1);
                        var u = a();
                        void 0 !== u && (t = u)
                    }
                }
                return t
            }
            l = l || 0;
            for (var c = e.length; c > 0 && e[c - 1][2] > l; c--) e[c] = e[c - 1];
            e[c] = [r, a, l]
        }
    }(), function () {
        s.n = function (e) {
            var t = e && e.__esModule ? function () {
                return e["default"]
            } : function () {
                return e
            };
            return s.d(t, {a: t}), t
        }
    }(), function () {
        s.d = function (e, t) {
            for (var r in t) s.o(t, r) && !s.o(e, r) && Object.defineProperty(e, r, {enumerable: !0, get: t[r]})
        }
    }(), function () {
        s.g = function () {
            if ("object" === typeof globalThis) return globalThis;
            try {
                return this || new Function("return this")()
            } catch (e) {
                if ("object" === typeof window) return window
            }
        }()
    }(), function () {
        s.o = function (e, t) {
            return Object.prototype.hasOwnProperty.call(e, t)
        }
    }(), function () {
        s.r = function (e) {
            "undefined" !== typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
        }
    }(), function () {
        var e = {143: 0};
        s.O.j = function (t) {
            return 0 === e[t]
        };
        var t = function (t, r) {
            var a, l, o = r[0], n = r[1], i = r[2], u = 0;
            if (o.some((function (t) {
                return 0 !== e[t]
            }))) {
                for (a in n) s.o(n, a) && (s.m[a] = n[a]);
                if (i) var c = i(s)
            }
            for (t && t(r); u < o.length; u++) l = o[u], s.o(e, l) && e[l] && e[l][0](), e[l] = 0;
            return s.O(c)
        }, r = self["webpackChunkpowerline"] = self["webpackChunkpowerline"] || [];
        r.forEach(t.bind(null, 0)), r.push = t.bind(null, r.push.bind(r))
    }();
    var r = s.O(void 0, [998], (function () {
        return s(5968)
    }));
    r = s.O(r)
})();